package com.daoeping.domain;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;


/**
 * Usr_user entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "usr_user", catalog = "daoeping")
public class Usr_user implements java.io.Serializable {

	// Fields

	private Integer id;
	private String username;
	private String password;
	private String email;
	private Usr_userdetailinfo usr_userdetailinfo;
	private Cop_companyuser cop_companyuser;
	private Bzn_jobdescription bzn_jobdescription;
	private Bzn_comment bzn_comment;
	private Usr_userProduction usr_userProduction;
	private Bzn_commentdraft bzn_commentdraft;
	private Usr_friend usr_friend;
	// Constructors

	/** default constructor */
	public Usr_user() {
	}


	/** full constructor */
	public Usr_user(String username, String password, String email,Usr_userdetailinfo usr_userdetailinfo,Cop_companyuser cop_companyuser,Bzn_jobdescription bzn_jobdescription , Bzn_comment bzn_comment ,Bzn_commentdraft bzn_commentdraft , Usr_friend usr_friend) {
		this.username = username;
		this.password = password;
		this.email = email;
		this.usr_userdetailinfo = usr_userdetailinfo;
		this.cop_companyuser = cop_companyuser;
		this.bzn_jobdescription = bzn_jobdescription;
		this.bzn_comment = bzn_comment;
		this.bzn_commentdraft = bzn_commentdraft;
		this.usr_friend = usr_friend;
		
	}



	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "username", nullable = false, length = 50)
	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	@Column(name = "password", nullable = false, length = 32)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "email", nullable = false, length = 50)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	   
	@OneToOne(mappedBy="usr_user",targetEntity=Usr_userdetailinfo.class)
	public Usr_userdetailinfo getUsr_userdetailinfo() {
		return usr_userdetailinfo;
	}
	
	public void setUsr_userdetailinfo(Usr_userdetailinfo usr_userdetailinfo) {
		this.usr_userdetailinfo = usr_userdetailinfo;
	}

	@OneToMany(cascade=CascadeType.ALL,mappedBy="Usr_user")
	public void setCop_companyuser(Cop_companyuser cop_companyuser) {
		this.cop_companyuser = cop_companyuser;
	}

	@OneToMany(cascade=CascadeType.ALL,mappedBy="Usr_user")
	public void setBzn_jobdescription(Bzn_jobdescription bzn_jobdescription) {
		this.bzn_jobdescription = bzn_jobdescription;
	}

	@OneToMany(cascade=CascadeType.ALL,mappedBy="Usr_user")
	public void setBzn_comment(Bzn_comment bzn_comment) {
		this.bzn_comment = bzn_comment;
	}

	@OneToMany(cascade=CascadeType.ALL,mappedBy="Usr_user")
	public void setUsr_userProduction(Usr_userProduction usr_userProduction) {
		this.usr_userProduction = usr_userProduction;
	}

	@OneToMany(cascade=CascadeType.ALL,mappedBy="Usr_user")
	public void setBzn_commentdraft(Bzn_commentdraft bzn_commentdraft) {
		this.bzn_commentdraft = bzn_commentdraft;
	}

	@OneToMany(cascade=CascadeType.ALL,mappedBy="Usr_user")
	public void setUsr_friend(Usr_friend usr_friend) {
		this.usr_friend = usr_friend;
	}
	
	
	

}